package com.njxzc.igo.service;

import java.util.Comparator;
import java.util.List;

import com.njxzc.igo.model.ProductType;
import com.njxzc.igo.model.Products;
import com.njxzc.igo.model.Seller;
import com.njxzc.igo.utils.Pager;
import com.njxzc.igo.utils.ShoppingResult;

public interface GoodsService {
	public ProductType LoadAllByTypeId(int typeId);
	
	public ProductType SortProductsByComparatorAsc(int typeId,String kind);
	
	public ProductType SortProductsByComparatorDesc(int typeId,String kind);
	
	public Products loadProductsDetails(int productId);
	
	public Pager findAllBySizeAndPageAsc(String kind,Pager pager);
	
	public Pager findAllBySizeAndPageDesc(String kind,Pager pager);
	
	public Pager loadProductsInPaging(int size,int page ,int type);
	
	public Products loadItemDetails(long productId);
	
	public Pager findAllByKeys(int size,int page,String key,String kind);
	
	//!
	public List<String> findAllSalersByTypeId(int id);
	
	public ShoppingResult findAllShoppingTypes();

	public ShoppingResult addnewType(String typename);

	public ShoppingResult addnewProductByType(int productTypeId,String productName,String productImgAdd,String details,String description,int price,int amount,int saleAmount,Seller saler);

	ShoppingResult deleteGoodsById(String productId);
	
	public ShoppingResult loadClassfiedSalersInfo();

	public Seller findSalerBysalerName(String salername);
	
}

